# 输入两个数字,中间有空格
a, b = map(int, input().split())
c = a // b
d = a % b
print(c, d)